package controller;

import java.awt.Point;
import java.util.List;

import utils.PlayerSides;

import model.Board;

/**
 * Interface for the game logic manager
 */
public interface Controller {

	/**
	 * Returns the game board
	 * @return game board
	 */
	public Board getBoard();
	
	/**
	 * Sets two players game
	 */
	public void setTwoPlayersGame();
	
	/**
	 * Sets single player game
	 */
	public void setSinglePlayerGame();
	
	/**
	 * Sets board for partial game
	 */
	public void setPartialGameBoard();
	
	/**
	 * Sets partial game
	 */
	public void setPartialGame();
	
	/**
	 * Sets automatic game
	 */
	public void setAutomaticGame();
	
	/**
	 * Sets special game
	 */
	public void setSpecialGame();
	
	/**
	 * Starts game after game is set
	 */
	public void startGame();
	
	/**
	 * Ends currently running game
	 */
	public void endGame();
	
	/**
	 * Adds piece of given type at given position assigned to given player. 
	 * @param position- position of the new piece
	 * @param type- type of the new piece
	 * @param pieceSide- side of the new piece
	 * @return True if could add the piece, False if not
	 */
	public boolean addPiece(Point position, String type, PlayerSides.Sides pieceSide);
	
	/**
	 * Returns list of possible moves of piece at given position.
	 * If no piece at given position or if piece at given position is not assigned to currently playing
	 * player, an empty list is returned.
	 * Otherwise, gets move list of the piece and returns only the moves that do not result in friendly
	 * King being threatened
	 * @param srcPosition- position of piece to move
	 * @return all safe destinations that are reachable for the piece at current turn
	 */
	public List<Point> getSafeDestinations(Point srcPosition);
	
	/**
	 * Places Creatures on board
	 */
	public void placeCreatures();
	
	/**
	 * Returns maximal number of pieces for each player in partial game
	 * @return maximal number of pieces for each player in partial game
	 */
	public int getMaxPiecesPertialGame();
}
